#ifndef __OC_FileUtil_H__
#define __OC_FileUtil_H__

#include "StringUtil.h"

namespace OCPP
{
    class _MainExport FileUtil
    {
    public:
        enum Type
        {
            FILE_NOT_FOUND,
            REGULAR_FILE,
            DIRECTORY
        };

        static StringVector findFiles(const String path);

        static void formatPathWithSeperator(String& path);
        static void formatPathNoSeperator(String& path);

        static bool existFile(String fileName);

        static String getFilePath(String fileName);

        static bool deleteFile(String fileName);

        static bool deletFolder(String filename);

        static bool makeDirectory(String path);

        static String getFileExtension(String fileName);
        static bool renameFile(String fileName, String newFilename);
        static FileUtil::Type typeOfFile(String fileName);
        static size_t sizeOfFile(String fileName);

        static String getFileText(String fileName);

        static std::vector<uint8> getFileBlob(String fileName);

        static String getFileBinary(String fileName);

        static bool writeFile(String fileName,String content);
    };
}

#endif
